﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PB.Airsoft.Business.Shop.Entities;
using PB.Airsoft.Business.Shop;

namespace PB.Airsoft.Web.city
{
    public partial class shop : System.Web.UI.Page
    {

        //protected void Page_Load(object sender, EventArgs e)
        //{
        //    var shopType = (ShopType)Enum.Parse(typeof(ShopType), Request.QueryString["shoptype"]);

        //    if (shopType == ShopType.FleaMarket)
        //        panelFleaMarket.Visible = true;

        //    repeaterShopLots.DataSource = ShopManager.GetShopLots(shopType);
        //    repeaterShopLots.DataBind();
        //}

        protected void Page_PreRender(object sender, EventArgs e)
        {
            var shopType = (ShopType)Enum.Parse(typeof(ShopType), Request.QueryString["shoptype"]);

            if (shopType == ShopType.FleaMarket)
                panelFleaMarket.Visible = true;

            repeaterShopLots.DataSource = ShopManager.GetShopLots(shopType);
            repeaterShopLots.DataBind();
        }
    }
}
